#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#include "wirama_communication.h"

int main(void)
{
	char buf[256];
	int len=0;
	connect_to_rcg();
	
	while(1)
	{
		fgets(buf,255,stdin);
//		sprintf(buf,"set operatingregion 2\n");
		write(rcg_fd,buf,strlen(buf));
		printf("Send Command : %s\n",buf);
		len=read(rcg_fd,buf,255);
		buf[len]=0;
		while(strcmp(buf,"Beamreader > "))
		{
			printf("Get Response : %s\n",buf);
			len=read(rcg_fd,buf,256);
			buf[len]=0;
		}
		printf("Get Response end: %s\n\n",buf);
	}
	disconnect_rcg();
	return 1;
}/*main*/

int reboot_system(void)
{
	return 0;
}/*reboot_system*/

int set_rcg_ethernet(int mode,char *ip, char *netmask)
{
	return 0;
}/*set_rcg_ethernet*/

